package com.cn.web.org.vo;

import cn.hutool.extra.pinyin.PinyinUtil;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

/**
 * description: UnitUserTreeV2VO <br>
 * date: 23.2.14 9:43 <br>
 * author: cn_yaojin <br>
 * version: 1.0 <br>
 */
@Setter
@Getter
@Accessors(chain = true)
@ApiModel(value = "用户部门树-V2")
public class UnitUserTreeV2VO {

    private String id;

    private String name;

    private String enName;

    private String userId = "0";

    private String parentId = "0";

    private List<UnitUserTreeV2VO> children = new ArrayList<>();

    public String getEnName() {
        return PinyinUtil.getPinyin(name, "");
    }
}
